import { defineStore } from "pinia";

const useSnackbarStore = defineStore("snackbar", {
  state: () => {
    return {
       snackbarVisible: false,
       snackbarMessage: "",
    };
  },
  actions: {
    showSnackbar(message: string){
      this.snackbarVisible = true;
      this.snackbarMessage = message;
    },
    hideSnackbar(){
      this.snackbarVisible = false;
    }
  },
});

export { useSnackbarStore };
